package com.wondertek.mam.tag.domain;

import com.mysql.jdbc.Driver;

import java.sql.SQLException;

/**
 * 标签类
 * Created by wangdongxu on 2017-09-06 上午 11:01:54.
 */
public class TagWord {

    /**
     * 词语
     */
    String word;
    /**
     * 分值
     */
    Integer score;

    public TagWord() {
    }

    public TagWord(String word, Integer score) {
        this.word = word;
        this.score = score;
    }

    public String getWord() {
        return word;
    }

    public void setWord(String word) {
        this.word = word;
    }

    public Integer getScore() {
        return score;
    }

    public void setScore(Integer score) {
        this.score = score;
    }

    @Override
    public String toString() {
        return "TagWord{" +
                "word='" + word + '\'' +
                ", score=" + score +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof TagWord)) return false;

        TagWord tagWord = (TagWord) o;

        return word != null ? word.equals(tagWord.word) : tagWord.word == null;
    }

    @Override
    public int hashCode() {
        return word != null ? word.hashCode() : 0;
    }
}
